\hypertarget{classfilesystem_1_1server_1_1ServerConnection}{\section{Referência da Classe filesystem.\-server.\-Server\-Connection}
\label{classfilesystem_1_1server_1_1ServerConnection}\index{filesystem.\-server.\-Server\-Connection@{filesystem.\-server.\-Server\-Connection}}
}


Diagrama de colaboração para filesystem.\-server.\-Server\-Connection\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{classfilesystem_1_1server_1_1ServerConnection__coll__graph}
\end{center}
\end{figure}
\subsection*{Métodos Públicos}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classfilesystem_1_1server_1_1ServerConnection_a215f3303754a82166701947e8768bf95}{Server\-Connection} (Socket socket)
\item 
void \hyperlink{classfilesystem_1_1server_1_1ServerConnection_a4462539887554fa8be90331edb33968f}{run} ()
\end{DoxyCompactItemize}


\subsection{Descrição Detalhada}
Trata a conexão de cada requisição individualmente.

Ao receber uma conexão o servidor instancia esta classe e passa ao objeto o controle da comunicação com o requisitante. 

\subsection{Construtores \& Destrutores}
\hypertarget{classfilesystem_1_1server_1_1ServerConnection_a215f3303754a82166701947e8768bf95}{\index{filesystem\-::server\-::\-Server\-Connection@{filesystem\-::server\-::\-Server\-Connection}!Server\-Connection@{Server\-Connection}}
\index{Server\-Connection@{Server\-Connection}!filesystem::server::ServerConnection@{filesystem\-::server\-::\-Server\-Connection}}
\subsubsection[{Server\-Connection}]{\setlength{\rightskip}{0pt plus 5cm}filesystem.\-server.\-Server\-Connection.\-Server\-Connection (
\begin{DoxyParamCaption}
\item[{Socket}]{socket}
\end{DoxyParamCaption}
)}}\label{classfilesystem_1_1server_1_1ServerConnection_a215f3303754a82166701947e8768bf95}
Instancia um tratador de conexão.


\begin{DoxyParams}{Parâmetros}
{\em socket} & Socket da conexão tratada. \\
\hline
\end{DoxyParams}


\subsection{Métodos}
\hypertarget{classfilesystem_1_1server_1_1ServerConnection_a4462539887554fa8be90331edb33968f}{\index{filesystem\-::server\-::\-Server\-Connection@{filesystem\-::server\-::\-Server\-Connection}!run@{run}}
\index{run@{run}!filesystem::server::ServerConnection@{filesystem\-::server\-::\-Server\-Connection}}
\subsubsection[{run}]{\setlength{\rightskip}{0pt plus 5cm}void filesystem.\-server.\-Server\-Connection.\-run (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classfilesystem_1_1server_1_1ServerConnection_a4462539887554fa8be90331edb33968f}
Thread de tratamento de conexões.

Trata a conexão de um cliente com o servidor de acordo com o tipo de requisição.

Mensagem de \char`\"{}\-R\-E\-A\-D\char`\"{}\-:
\begin{DoxyItemize}
\item read path/to/file pipe\-I\-D
\end{DoxyItemize}

Respostas\-:
\begin{DoxyItemize}
\item ack ok pipe\-I\-D path/to/file
\begin{DoxyItemize}
\item Aguarda um mensagem de fim de leitura\-:
\begin{DoxyItemize}
\item end\-Read ok
\item end\-Read fail
\end{DoxyItemize}
\end{DoxyItemize}
\end{DoxyItemize}


\begin{DoxyItemize}
\item ack fail B\-U\-S\-Y
\end{DoxyItemize}


\begin{DoxyItemize}
\item ack fail N\-O\-T\-\_\-\-E\-X\-I\-S\-T\-S
\end{DoxyItemize}

Mensagem de \char`\"{}\-C\-R\-E\-A\-T\-E\char`\"{}\-:
\begin{DoxyItemize}
\item create path/to/file pipe\-I\-D
\end{DoxyItemize}

Respostas\-:
\begin{DoxyItemize}
\item ack ok
\item ack fail F\-I\-L\-E\-\_\-\-A\-L\-R\-E\-A\-D\-Y\-\_\-\-E\-X\-I\-S\-T\-S
\end{DoxyItemize}

Mensagem de \char`\"{}\-D\-E\-L\-E\-T\-E\char`\"{}\-:
\begin{DoxyItemize}
\item delete path/to/file
\end{DoxyItemize}

Respostas\-:
\begin{DoxyItemize}
\item ack ok
\item ack fail B\-U\-S\-Y
\end{DoxyItemize}

Mensagem de \char`\"{}\-W\-R\-I\-T\-E\char`\"{}\-:
\begin{DoxyItemize}
\item write path/to/file pipe\-I\-D
\end{DoxyItemize}

Respostas\-:
\begin{DoxyItemize}
\item ack ok
\end{DoxyItemize}

ack fail B\-U\-S\-Y
\begin{DoxyItemize}
\item ack fail N\-O\-T\-\_\-\-E\-X\-I\-S\-T\-S
\end{DoxyItemize}

Caso uma mensagem inválida seja recebida.

Resposta\-:
\begin{DoxyItemize}
\item ack fail I\-N\-V\-A\-L\-I\-D\-\_\-\-C\-O\-M\-M\-A\-N\-D 
\end{DoxyItemize}

Este é o diagrama das funções utilizadas por esta função\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classfilesystem_1_1server_1_1ServerConnection_a4462539887554fa8be90331edb33968f_cgraph}
\end{center}
\end{figure}




A documentação para esta classe foi gerada a partir do seguinte arquivo\-:\begin{DoxyCompactItemize}
\item 
src/filesystem/server/\hyperlink{ServerConnection_8java}{Server\-Connection.\-java}\end{DoxyCompactItemize}
